{% extends "common/layout_main.html" %}
{% block content %}
{% include "common/tab_member.html" %}
<div class="row m-t">
    <div class="col-lg-12">
        <div class="row">
            <div class="col-lg-12">
                <div class="m-b-md">
                    {% if info.status == 1 %}
                    <a class="btn btn-outline btn-primary pull-right" href="{{ buildUrl('/member/set') }}?id={{ info.id }}">
                        <i class="fa fa-pencil"></i>编辑
                    </a>
                    {% endif %}
                    <h2>会员信息</h2>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-2 text-center">
                <img class="img-circle circle-border" src="{{ info.avatar }}"
                     width="100px" height="100px">
            </div>
            <div class="col-lg-10">
                <p class="m-t">姓名：{{ info.nickname }}</p>
                <p>性别：{{ info.sex_desc }}</p>
            </div>
        </div>
        <div class="row m-t">
            <div class="col-lg-12">
                <div class="panel blank-panel">
                    <div class="panel-heading">
                        <div class="panel-options">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="#tab-1" data-toggle="tab" aria-expanded="false">会员订单</a>
                                </li>
                                <li>
                                    <a href="#tab-2" data-toggle="tab" aria-expanded="true">会员评论</a>
                                </li>
                            </ul>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="tab-content">
                            <div class="tab-pane active" id="tab-1">
                                <table class="table table-striped">
                                    <thead>
                                    <tr>
                                        <th>订单编号</th>
                                        <th>支付时间</th>
                                        <th>支付金额</th>
                                        <th>订单状态</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                     {%  if pay_order_list %}
                                        {% for item in pay_order_list %}
                                    <tr>
                                       <td>{{ item.order_number }}</td>
                                       <td>{{ item.pay_time }}</td>
                                       <td>{{ item.total_price }}</td>
                                       <td>{{ item.status_desc }}</td>
                                    </tr>
                                        {% endfor %}
                                    {% else %}
                                         <td colspan="4">暂无订单</td>
                                    {% endif %}
                                    </tbody>
                                </table>
                            </div>
                            <div class="tab-pane" id="tab-2">
                                <table class="table table-striped">
                                    <thead>
                                    <tr>
                                        <th>评论时间</th>
                                        <th>评分</th>
                                        <th>评论内容</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                    </tr>
                                    {%  if comment_list %}
                                        {% for item in comment_list %}
                                    <tr>
                                        <td>{{ item.created_time }}</td>
                                        <td>{{ item.score }}</td>
                                        <td>{{ item.content }}</td>
                                    </tr>
                                         {% endfor %}
                                    {% else %}
                                         <td colspan="3">暂无评论</td>
                                    {% endif %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
